﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace WindowsGame1
{
    public class AlienEvent
    {
        public float time = 0;
        public delegate void OnTimeDelegate(AlienEvent ev);
        public event OnTimeDelegate OnTime;
        public bool done = false;
        public Vector2 start;
        public Vector2 end;
        public float speed;
        public int colorIndex;

        public bool Pool(float last, float current)
        {            
            if (time >= last && time < current)
            {
                if (OnTime != null)
                    OnTime(this);

                done = true;
            }

            if (current < time)
                return false;

            return true;
        }
    }
}
